import type {App, VNode} from 'vue'
import loading from './index.vue' 
import {createVNode,render} from 'vue'
export default {
  install(app:App){
    const Vnode: VNode = createVNode(loading)
    render(Vnode, document.body)
    app.config.globalProperties._loading = {
      show: Vnode.component?.exposed?.show,
      hide: Vnode.component?.exposed?.hide,
    }
  }
} 